CREATE TABLE jms_dm.dm_fr_tyd_departure_transfer_timely_route_summary_dt
(
    start_code                       varchar(100) comment '始发地发件中心编码',
    start_name                       varchar(100) comment '始发地发件中心名称',
    order_source_code                varchar(100) comment '订单来源编码',
    order_source_name                varchar(100) comment '订单来源名称',
    center_type                      varchar(100) comment '中心类型1始发2中转',
    start_agent_code                 varchar(100) comment '发件代理区编码',
    start_agent_name                 varchar(100) comment '发件代理区名称',
    send_account                     int comment '发件票数',
    route_lack_account               int comment '静态路由缺失票数',
    transfer_intime_account          int comment '转运及时票数',
    transfer_intime_rate             double comment '出港转运及时率',
    without_arrival_account          int comment '无到达时间票数',
    error_send_account               int comment '错发票数',
    opp_delay_account                int comment '操作延误票数',
    send_delay_account               int comment '发车晚点票数',
    shipment_delay_account           int comment '任务单问题票数',
    stop_delay_account               int comment '经停点问题票数',
    all_line_transfer_intime_account int comment '全链路转运及时票数',
    all_line_transfer_intime_rate    double comment '全链路转运及时率',
    shipment_error_account           int comment '任务单错用票数',
    mage_region_code                 varchar(100) comment '管理大区编码',
    mage_region_name                 varchar(100) comment '管理大区名称',
    date_time                        date comment '日期'
) ENGINE = OLAP DUPLICATE KEY(start_code)
COMMENT "T-1出港转运及时率-汇总兔优达"
PARTITION BY RANGE(date_time)
(START ("2022-09-01") END ("2022-10-05") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(start_code) BUCKETS 1
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-360",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);
